package com.audiocn.poster;

import android.content.Context;
import android.view.Gravity;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.audiocn.model.PresentInfoModel;

public class PresentsListDC extends LinearLayout{
	
	private TextView mTitle, mTime;

	public PresentsListDC(Context context, PresentInfoModel presentInfo) {
		super(context);
		this.setOrientation(VERTICAL);
		this.setPadding(5, 5, 5, 5);
		this.setBackgroundColor(0xff888888);
		
		mTitle = new TextView(context);
		mTitle.setText(presentInfo.mtitle);
		mTitle.setTextSize(20);
		addView(mTitle, new LinearLayout.LayoutParams(
				LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
		
		mTime = new TextView(context);
		mTime.setText("接收礼品人："+presentInfo.msort+"       "+presentInfo.mtime);
		mTime.setTextSize(12);
		mTime.setGravity(Gravity.RIGHT);
		addView(mTime, new LinearLayout.LayoutParams(
				LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
	}
	public void setPresentTitle(String name) {
		mTitle.setText(name);
	}
	
	public void setPresentTime(String name) {
		mTime.setText(name);
	}

}
